.class public Lcom/nemustech/tiffany/world/TFTextureInfo;
.super Ljava/lang/Object;
.source "TFTextureInfo.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;
    }
.end annotation


# static fields
.field static final MAX_LAYER_COUNT:I = 0x2


# instance fields
.field bTextureRemovedByForce:Z

.field public mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

.field private mLayerCount:I


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .line 15
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 10
    const/4 v1, 0x0

    iput v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    .line 13
    const/4 v1, 0x2

    new-array v1, v1, [Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    iput-object v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    .line 16
    new-instance v0, Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    invoke-direct {v0, p0}, Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;-><init>(Lcom/nemustech/tiffany/world/TFTextureInfo;)V

    .line 17
    .local v0, defaultLayer:Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;
    invoke-virtual {p0, v0}, Lcom/nemustech/tiffany/world/TFTextureInfo;->addLayer(Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;)V

    .line 18
    return-void
.end method


# virtual methods
.method public addLayer(Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;)V
    .locals 2
    .parameter "layerInfo"

    .prologue
    .line 70
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    iget v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    aput-object p1, v0, v1

    .line 71
    iget v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    .line 72
    return-void
.end method

.method public deleteLayer(I)V
    .locals 2
    .parameter "index"

    .prologue
    .line 75
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    const/4 v1, 0x0

    aput-object v1, v0, p1

    .line 76
    iget v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    const/4 v1, 0x1

    sub-int/2addr v0, v1

    iput v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    .line 77
    return-void
.end method

.method public getBitmap()Landroid/graphics/Bitmap;
    .locals 2

    .prologue
    .line 103
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    const/4 v1, 0x0

    aget-object v0, v0, v1

    iget-object v0, v0, Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;->bmp:Landroid/graphics/Bitmap;

    return-object v0
.end method

.method public getCoordRatioHeight(I)F
    .locals 1
    .parameter "layerIndex"

    .prologue
    .line 110
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    aget-object v0, v0, p1

    invoke-static {v0}, Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;->access$100(Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;)F

    move-result v0

    return v0
.end method

.method public getCoordRatioWidth(I)F
    .locals 1
    .parameter "layerIndex"

    .prologue
    .line 106
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    aget-object v0, v0, p1

    invoke-static {v0}, Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;->access$000(Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;)F

    move-result v0

    return v0
.end method

.method public getLayer(I)Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;
    .locals 1
    .parameter "index"

    .prologue
    .line 92
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    aget-object v0, v0, p1

    return-object v0
.end method

.method public getLayerCount()I
    .locals 1

    .prologue
    .line 96
    iget v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    return v0
.end method

.method public getMaxLayerCount()I
    .locals 1

    .prologue
    .line 100
    const/4 v0, 0x2

    return v0
.end method

.method public insertLayer(ILcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;)V
    .locals 4
    .parameter "index"
    .parameter "layerInfo"

    .prologue
    .line 80
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFTextureInfo;->getLayerCount()I

    move-result v1

    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFTextureInfo;->getMaxLayerCount()I

    move-result v2

    if-lt v1, v2, :cond_0

    .line 81
    new-instance v1, Ljava/lang/IllegalArgumentException;

    const-string v2, "Layer index exceeded"

    invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 84
    :cond_0
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    if-lt v0, p1, :cond_1

    .line 85
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    add-int/lit8 v2, v0, 0x1

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    aget-object v3, v3, v0

    aput-object v3, v1, v2

    .line 84
    add-int/lit8 v0, v0, -0x1

    goto :goto_0

    .line 87
    :cond_1
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    aput-object p2, v1, p1

    .line 88
    iget v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    add-int/lit8 v1, v1, 0x1

    iput v1, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    .line 89
    return-void
.end method

.method public setLayer(ILcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;)V
    .locals 2
    .parameter "index"
    .parameter "layerInfo"

    .prologue
    .line 65
    iget v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayerCount:I

    if-lt p1, v0, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "Layer index exceeded"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 66
    :cond_0
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFTextureInfo;->mLayer:[Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    aput-object p2, v0, p1

    .line 67
    return-void
.end method
